//this will load when the dom is ready
$(document).ready(function() {
	
	// enable accounts selector function
	$("#btnChangeAccount").click(function() {		
		var accountId = $("#selectAccount").val(); 
		window.location = '/cashflow/accounts/' + accountId;
	});
	
	// any balance table cells should turn red if they are a negative number	
	$("td.balance:contains('-')").css("color", "red").css("font-weight", "bold");
	
	// any cell that is editable
	/*$("td.editable").click(function() {		
		var value = $(this).html();
		if (value.search("input") == -1) {
			$(this).html("<input style='width:60%' type='text' name='x' value='" + value + "'/><img title='Update' src='/cashflow/static/images/tick-icon.png'/> <img text='Cancel' src='/cashflow/static/images/block-icon.png'/>");
		}
	});*/
	
}); // everything is this function will load when the dom is ready